package com.cn.mmd.tools;


/**
 * Created by Administrator on 2016/7/1 0001.
 */
public class SplitSpring {
    public String[] splitSpringBy(String s,int n,int m,String by,int num){
        String[] string = null;
        String ss;
        if (s.length()>0) {
            if (n > 0&&m==0&&by.equals("")) {
              ss = s.substring(n);
                string = new String[1];
                string[0] = ss;
            }
            else if (n >=0 && m > 0&&by.equals("")) {
                string = new String[1];
               ss = s.substring(n,m);
                string[0] =ss;
            }
            else if (!by.equals("")&&n <= 0&&m<=0) {
                string =s.split(by);
            }
        }
        return string;
    }
}
